pkgname=yambar-wayland
pkgver=1.1.1
pkgrel=1
pkgdesc="Simplistic and highly configurable status panel for Wayland"
arch=('x86_64')
url=https://gitlab.com/dnkl/yambar
license=(mit)
conflicts=('yambar')
provides=('yambar')
makedepends=('meson' 'ninja' 'scdoc')
depends=(
  'wayland' 'wlroots'
  'freetype2' 'fontconfig' 'pixman'
  'libyaml'
  'alsa-lib'
  'libudev.so'
  'json-c'
  'libmpdclient')
source=()

pkgver() {
  cd ../.git &> /dev/null && git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
      head -3 ../meson.build | grep version | cut -d "'" -f 2
}

build() {
  meson --buildtype=release --prefix=/usr -Db_lto=true -Dbackend-x11=disabled -Dbackend-wayland=enabled ../
  ninja
}

package() {
  DESTDIR="${pkgdir}/" ninja install
}
